import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
// 引入全局element-plus
import ElementPlus, { ElMessage } from 'element-plus'
import './common/base.css'
import 'element-plus/dist/index.css'
// 引入element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import locale from 'element-plus/es/locale/lang/zh-cn'
import axios from 'axios'
import service from './service'
import echarts from 'echarts'

// import myecharts from './plugins/echarts'

const app=createApp(App)
// 循环遍历element-plus中的图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }  
  // 导入mitt--兄弟组件传值中使用
  // import mitt from 'mitt'
  // 挂载到全局
// app.config.globalProperties.$https=axios
// app.config.globalProperties.service=service
app.config.globalProperties.$echarts=echarts

app.use(ElementPlus,{locale}).use(router).mount('#app')
